package com.project.bohang.controller;


import com.project.bohang.common.model.Response;
import com.project.bohang.common.model.page.PageResult;
import com.project.bohang.entity.UserSendGoods;
import com.project.bohang.pojo.dto.SendGoodsRecordDto;
import com.project.bohang.pojo.dto.UserSendGoodsDto;
import com.project.bohang.pojo.vo.SendGoodsRecordVo;
import com.project.bohang.pojo.vo.UserSendGoodsVo;
import com.project.bohang.service.UserSendGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import com.project.bohang.controller.BaseController;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *  疫情物资发放信息（用户）
 *
 * @author bohang
 * @since 2022-03-26
 */
@Controller
@RequestMapping("/userSendGoods")
@ResponseBody
public class UserSendGoodsController extends BaseController {

    @Autowired
    private UserSendGoodsService userSendGoodsService;

    /**
     * 疫情物资发放列表（每次发放这里会多一条记录）
     *
     * @return
     */
    @PostMapping("/list")
    public Response<PageResult<UserSendGoodsVo>> selectList(@RequestBody UserSendGoodsDto req){
        return Response.success(getDataTable(userSendGoodsService.userSendGoodsList(req)));
    }
}

